package com.spukmk3me.impl.libgdx;

import java.io.IOException;
import java.io.InputStream;

import com.badlogic.gdx.Gdx;
import com.spukmk3me.io.FileSystem;

final class LibgdxFileHandle extends com.spukmk3me.io.FileHandle
{
    LibgdxFileHandle( String path, byte location, FileSystem fsys )
    {
        super( path, location, fsys );
        m_handle = Gdx.files.internal( path );
    }
    
    @Override
    protected InputStream openInputStream() throws IOException
    {
        return m_handle.read();
    }

    @Override
    public boolean exists()
    {
        return m_handle.exists();
    }
    
    private com.badlogic.gdx.files.FileHandle m_handle;
}
